package com.itheima.demo;

import java.io.*;
import java.util.Arrays;
import java.util.Scanner;
import java.util.Set;
import java.util.TreeSet;

public class Demo07 {
    public static void main(String[] args) throws IOException {
        Scanner sc = new Scanner(System.in);

        String s = sc.nextLine();

        BufferedWriter bw = new BufferedWriter(new FileWriter("day12_IO\\a.txt"));

        String[] s1 = s.split(" ");

        int[] arrs = new int[s1.length];
        for (int i = 0; i < s1.length; i++) {
            arrs[i] = Integer.valueOf(s1[i]);
        }
        Arrays.sort(arrs);
        System.out.println(Arrays.toString(arrs));

        for (int arr : arrs) {
            bw.write(String.valueOf(arr)+" ");
        }

        bw.close();

    }
}
